import { _RouteLocationBase } from "vue-router";

export default function getMetaFuncValue(route: _RouteLocationBase, key: string): string {
  const value = route.meta[key];
  if (typeof value === 'string') {
    return value;
  }
  else if (typeof value === 'function') {
    return value(route);
  }
  return null;
}
